<script>
	export default {
		globalData:{
			openid:'',
			userInfo:null,
			hasLogin:false,
			URL:'https://lldt.ltd:444',
			// currentCityName:'合肥',
			// currentCityValue:'hf'
		},
		onLaunch: function() {
			this.$store.dispatch('getCity')
			wx.cloud.init()
			wx.cloud.callFunction({
				name:'getOpenid',
				success:(res)=>{
					getApp().globalData.openid=res.result.openid
					this.$checkRegister()
				},
				fail:(err)=>{
					console.log('获取失败！')
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		onPageNotFound() {
			uni.navigateTo({
				url:'pages/404/404'
			})
		},
		getOpenid(){
			uniCloud.callFunction({
				name:'getOpenid',
				success:(res)=>{
					console.log(1233)
				},
				fail:(err)=>{
					console.log('云函数调用失败！',err)
				}
			})
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	// @import "/wxcomponents/vant/dist/common/index.wxss";
</style>
